#include "lunar.h"
#include <stdio.h>
#include <string.h>
#include <time.h>

// ===================== 农历数据表说明 =====================
// LUNAR_INFO：1900-2100年农历信息，每年一个24位整数
// 低4位：闰月月份（0表示无闰月，1-12表示闰几月）
// 第5-16位：12个月的大小月（1为30天，0为29天），从高到低依次为正月到腊月
// 第17位：闰月大小（1为30天，0为29天）
// 其余位未用
static const unsigned int LUNAR_INFO[201] = {
    0x04bd8,0x04ae0,0x0a570,0x054d5,0x0d260,0x0d950,0x16554,0x056a0,0x09ad0,0x055d2, //1900-1909
    0x04ae0,0x0a5b6,0x0a4d0,0x0d250,0x1d255,0x0b540,0x0d6a0,0x0ada2,0x095b0,0x14977, //1910-1919
    0x04970,0x0a4b0,0x0b4b5,0x06a50,0x06d40,0x1ab54,0x02b60,0x09570,0x052f2,0x04970, //1920-1929
    0x06566,0x0d4a0,0x0ea50,0x06e95,0x05ad0,0x02b60,0x186e3,0x092e0,0x1c8d7,0x0c950, //1930-1939
    0x0d4a0,0x1d8a6,0x0b550,0x056a0,0x1a5b4,0x025d0,0x092d0,0x0d2b2,0x0a950,0x0b557, //1940-1949
    0x06ca0,0x0b550,0x15355,0x04da0,0x0a5b0,0x14573,0x052b0,0x0a9a8,0x0e950,0x06aa0, //1950-1959
    0x0aea6,0x0ab50,0x04b60,0x0aae4,0x0a570,0x05260,0x0f263,0x0d950,0x05b57,0x056a0, //1960-1969
    0x096d0,0x04dd5,0x04ad0,0x0a4d0,0x0d4d4,0x0d250,0x0d558,0x0b540,0x0b6a0,0x195a6, //1970-1979
    0x095b0,0x049b0,0x0a974,0x0a4b0,0x0b27a,0x06a50,0x06d40,0x0af46,0x0ab60,0x09570, //1980-1989
    0x04af5,0x04970,0x064b0,0x074a3,0x0ea50,0x06b58,0x055c0,0x0ab60,0x096d5,0x092e0, //1990-1999
    0x0c960,0x0d954,0x0d4a0,0x0da50,0x07552,0x056a0,0x0abb7,0x025d0,0x092d0,0x0cab5, //2000-2009
    0x0a950,0x0b4a0,0x0baa4,0x0ad50,0x055d9,0x04ba0,0x0a5b0,0x15176,0x052b0,0x0a930, //2010-2019
    0x07954,0x06aa0,0x0ad50,0x05b52,0x04b60,0x0a6e6,0x0a4e0,0x0d260,0x0ea65,0x0d530, //2020-2029
    0x05aa0,0x076a3,0x096d0,0x04afb,0x04ad0,0x0a4d0,0x1d0b6,0x0d250,0x0d520,0x0dd45, //2030-2039
    0x0b5a0,0x056d0,0x055b2,0x049b0,0x0a577,0x0a4b0,0x0aa50,0x1b255,0x06d20,0x0ada0, //2040-2049
    0x14b63,0x09370,0x049f8,0x04970,0x064b0,0x168a6,0x0ea50,0x06b20,0x1a6c4,0x0aae0, //2050-2059
    0x0a2e0,0x0d2e3,0x0c960,0x0d557,0x0d4a0,0x0da50,0x05d55,0x056a0,0x0a6d0,0x055d4, //2060-2069
    0x052d0,0x0a9b8,0x0a950,0x0b4a0,0x0b6a6,0x0ad50,0x055a0,0x0aba4,0x0a5b0,0x052b0, //2070-2079
    0x0b273,0x06930,0x07337,0x06aa0,0x0ad50,0x14b55,0x04b60,0x0a570,0x054e4,0x0d160, //2080-2089
    0x0e968,0x0d520,0x0daa0,0x16aa6,0x056d0,0x04ae0,0x0a9d4,0x0a2d0,0x0d150,0x0f252, //2090-2099
    0x0d520 //2100
};

// SPRING_FESTIVAL：1900-2100年春节公历日期表，每年一个32位整数
// 高16位：年份
// 第17-24位：月份
// 第25-32位：日
static const unsigned int SPRING_FESTIVAL[201] = {
    0x76c011f,0x76d0213,0x76e0208,0x76f011d,0x7700210,0x7710204,0x7720119,0x773020d,0x7740204,0x7750116, //1900-1909
    0x776020a,0x777011e,0x7780212,0x7790206,0x77a011a,0x77b020e,0x77c0204,0x77d0117,0x77e020b,0x77f0201, //1910-1919
    0x7800214,0x7810208,0x782011c,0x7830210,0x7840205,0x7850118,0x786020d,0x7870202,0x7880117,0x789020a, //1920-1929
    0x78a011e,0x78b0211,0x78c0206,0x78d011a,0x78e020e,0x78f0204,0x7900118,0x791020b,0x792011f,0x7930213, //1930-1939
    0x7940208,0x795011b,0x796020f,0x7970205,0x7980119,0x799021d,0x79a0202,0x79b0116,0x79c020a,0x79d011d, //1940-1949
    0x79e0211,0x79f0206,0x7a0011b,0x7a1020e,0x7a20203,0x7a30118,0x7a4020c,0x7a5011f,0x7a60212,0x7a70208, //1950-1959
    0x7a8011c,0x7a9020f,0x7aa0205,0x7ab0119,0x7ac020d,0x7ad0202,0x7ae0115,0x7af0209,0x7b0011e,0x7b10211, //1960-1969
    0x7b20206,0x7b3011a,0x7b4020f,0x7b50203,0x7b60117,0x7b7020b,0x7b8011f,0x7b90212,0x7ba0207,0x7bb011c, //1970-1979
    0x7bc0210,0x7bd0205,0x7be0119,0x7bf020d,0x7c00202,0x7c10214,0x7c20209,0x7c3011d,0x7c40211,0x7c50206, //1980-1989
    0x7c6011b,0x7c7020f,0x7c80204,0x7c90117,0x7ca020a,0x7cb011f,0x7cc0213,0x7cd0207,0x7ce011c,0x7cf0210, //1990-1999
    0x7d00205,0x7d10118,0x7d2021c,0x7d30201,0x7d40116,0x7d50209,0x7d6011d,0x7d70212,0x7d80207,0x7d9011a, //2000-2009
    0x7da020e,0x7db0203,0x7dc0117,0x7dd020a,0x7de011f,0x7df0213,0x7e00208,0x7e1010c,0x7e20210,0x7e30205, //2010-2019
    0x7e40119,0x7e5020c,0x7e60201,0x7e70116,0x7e8020a,0x7e9011d,0x7ea0211,0x7eb0206,0x7ec011a,0x7ed020d, //2020-2029
    0x7ee0203,0x7ef0117,0x7f0020b,0x7f1011f,0x7f20213,0x7f30208,0x7f4011c,0x7f5020f,0x7f60204,0x7f70118, //2030-2039
    0x7f8020c,0x7f90201,0x7fa0116,0x7fb020a,0x7fc011e,0x7fd0211,0x7fe0206,0x7ff010a,0x800020e,0x8010202, //2040-2049
    0x8020117,0x803020b,0x8040201,0x8050213,0x8060208,0x807011c,0x808020f,0x8090204,0x80a0118,0x80b020c, //2050-2059
    0x80c0202,0x80d0115,0x80e0209,0x80f011d,0x8100211,0x8110205,0x812011a,0x813020e,0x8140203,0x8150117, //2060-2069
    0x816020b,0x817011f,0x8180213,0x8190207,0x81a011b,0x81b020e,0x81c0205,0x81d0118,0x81e020c,0x81f0202, //2070-2079
    0x8200116,0x8210209,0x822011d,0x8230211,0x8240206,0x825011a,0x826021e,0x8270203,0x8280118,0x829020a, //2080-2089
    0x82a011e,0x82b0212,0x82c0207,0x82d011b,0x82e020f,0x82f0205,0x8300109,0x831020c,0x8320201,0x8330115, //2090-2099
    0x8340209 //2100
};

// 获取某年春节的公历日期
// 返回Date结构体，包含年、月、日
typedef struct { int year, month, day; } Date;
static Date getSpringDate(int year) {
    unsigned int v = SPRING_FESTIVAL[year - 1900];
    Date d;
    d.year = (v >> 16) & 0xFFFF;
    d.month = (v >> 8) & 0xFF;
    d.day = v & 0xFF;
    return d;
}

// 获取某年农历每月天数和闰月信息
// 返回LunarYearInfo结构体：leapMonth为闰月（0无闰月），monthDays为每月天数，monthCount为月数（12或13）
typedef struct { int leapMonth; int monthDays[13]; int monthCount; } LunarYearInfo;
static LunarYearInfo getLunarYearInfo(int year) {
    LunarYearInfo info;
    unsigned int v = LUNAR_INFO[year - 1900];
    info.leapMonth = v & 0xF;
    int i, idx = 0;
    if (info.leapMonth) {
        // 有闰月，插入闰月天数
        for (i = 0; i < 12; ++i) {
            info.monthDays[idx++] = ((v >> (4 + 11 - i)) & 0x1) ? 30 : 29;
            if ((i + 1) == info.leapMonth) {
                info.monthDays[idx++] = ((v >> 16) & 0x1) ? 30 : 29;
            }
        }
        info.monthCount = 13;//设置月份数
    } else {
        for (i = 0; i < 12; ++i) {
            info.monthDays[i] = ((v >> (4 + 11 - i)) & 0x1) ? 30 : 29;
        }
        info.monthCount = 12;//设置月份数
    }
    // 如果没有闰月，清零多余项
    for (i = info.monthCount; i < 13; ++i) info.monthDays[i] = 0;
    return info;
}

// 用于农历推算，内部辅助
static int date_to_days(int year, int month, int day) {
    static const int days_in_month[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
    int y = year, m = month, d = day;
    int days = 0;
    for (int i = 1900; i < y; ++i) {
        days += 365;
        if ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0)) days += 1;
    }
    for (int i = 1; i < m; ++i) {
        days += days_in_month[i-1];
        if (i == 2 && ((y % 4 == 0 && y % 100 != 0) || (y % 400 == 0))) days += 1;
    }
    days += d - 1;
    return days;
}

static int daysBetween(Date d1, Date d2) {
    int days1 = date_to_days(d1.year, d1.month, d1.day);
    int days2 = date_to_days(d2.year, d2.month, d2.day);
    return days2 - days1;
}

// 公历转农历（返回0成功，-1失败）
// 步骤：
// 1. 查找当年春节公历日期
// 2. 若目标日期早于春节，则归入上一农历年
// 3. 计算距春节的天数offset
// 4. 依次累加农历月天数，定位农历月和日
int SolarToLunar(int year, int month, int day, int *ly, int *lm, int *ld, int *isLeap) {
    if (year < 1900 || year > 2100) return -1;
    Date spring = getSpringDate(year);
    Date solar = {year, month, day};
    int offset = daysBetween(spring, solar);
    int lyear = year;
    if (offset < 0) {
        // 还没到春节，属于上一农历年
        lyear--;
        spring = getSpringDate(lyear);
        offset = daysBetween(spring, solar);
    }
    LunarYearInfo info = getLunarYearInfo(lyear);
    int m = 0;
    int found = 0;
    int days = 0;
    *isLeap = 0;
    for (m = 0; m < info.monthCount; ++m) {
        if (offset < info.monthDays[m]) {
            found = 1;
            break;
        }
        offset -= info.monthDays[m];
    }
    if (!found) return -1;
    *ly = lyear;
    if (info.leapMonth && m == info.leapMonth) {
        *isLeap = 1;
        *lm = info.leapMonth;
    } else {
        *isLeap = 0;
        if (info.leapMonth && m > info.leapMonth) {
            *lm = m;
        } else {
            *lm = m + 1;
        }
    }
    *ld = offset + 1;
    return 0;
}

// 农历转公历（返回0成功，-1失败）
// 步骤：
// 1. 查找当年春节公历日期
// 2. 累加农历月天数，定位到目标农历月
// 3. 加上农历日，得到公历日期
int LunarToSolar(int year, int month, int day, int isLeap, int *gy, int *gm, int *gd) {
    if (year < 1900 || year > 2100) return -1;
    Date spring = getSpringDate(year);
    LunarYearInfo info = getLunarYearInfo(year);
    int offset = 0;
    int m;
    for (m = 0; m < info.monthCount; ++m) {
        int curMonth, curLeap;
        if (info.leapMonth && m == info.leapMonth) {
            curMonth = info.leapMonth;
            curLeap = 1;
        } else {
            curLeap = 0;
            if (info.leapMonth && m > info.leapMonth) {
                curMonth = m;
            } else {
                curMonth = m + 1;
            }
        }
        if (curMonth == month && curLeap == isLeap) break;
        offset += info.monthDays[m];
    }
    offset += day - 1;
    struct tm t = {0};
    t.tm_year = spring.year - 1900;
    t.tm_mon = spring.month - 1;
    t.tm_mday = spring.day + offset;
    mktime(&t);
    *gy = t.tm_year + 1900;
    *gm = t.tm_mon + 1;
    *gd = t.tm_mday;
    return 0;
}

// 获取天干地支字符串
// 公元4年为甲子年，循环取余
void GetGanZhi(int year, int month, int day, char *gz, int bufsize) {
    static const char *TIANGAN[10] = {"甲","乙","丙","丁","戊","己","庚","辛","壬","癸"};
    static const char *DIZHI[12] = {"子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"};
    int gan = (year - 4) % 10;
    int zhi = (year - 4) % 12;
    snprintf(gz, bufsize, "%s%s年", TIANGAN[gan], DIZHI[zhi]);
}

// ===================== 节气查表数据与函数 =====================
// SOLAR_TERMS：24节气名称，顺序与节气表一致
const char* SOLAR_TERMS[24] = {
    "小寒", "大寒", "立春", "雨水", "惊蛰", "春分",
    "清明", "谷雨", "立夏", "小满", "芒种", "夏至",
    "小暑", "大暑", "立秋", "处暑", "白露", "秋分",
    "寒露", "霜降", "立冬", "小雪", "大雪", "冬至"
};

// solar_terms_table：1901~2100年节气表
// 每年24个SolarTermDate结构体，依次为当年24节气的公历月日
const SolarTermDate solar_terms_table[200][24] = {
    { {1,6},{1,21},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,23},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,22} }, // 1901
    { {1,6},{1,21},{2,5},{2,19},{3,6},{3,21},{4,6},{4,21},{5,6},{5,22},{6,7},{6,22},{7,8},{7,24},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,23} }, // 1902
    { {1,6},{1,21},{2,5},{2,20},{3,7},{3,22},{4,6},{4,21},{5,7},{5,22},{6,7},{6,22},{7,8},{7,24},{8,9},{8,24},{9,9},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,23} }, // 1903
    { {1,7},{1,21},{2,5},{2,20},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1904
    { {1,6},{1,21},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,23},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,22} }, // 1905
    { {1,6},{1,21},{2,5},{2,19},{3,6},{3,21},{4,6},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,24},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,23} }, // 1906
    { {1,6},{1,21},{2,5},{2,20},{3,7},{3,22},{4,6},{4,21},{5,7},{5,22},{6,7},{6,22},{7,8},{7,24},{8,9},{8,24},{9,9},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,23} }, // 1907
    { {1,7},{1,21},{2,5},{2,20},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1908
    { {1,6},{1,21},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,23},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,22} }, // 1909
    { {1,6},{1,21},{2,5},{2,19},{3,6},{3,21},{4,6},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,24},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,23} }, // 1910
    { {1,6},{1,21},{2,5},{2,20},{3,7},{3,22},{4,6},{4,21},{5,7},{5,22},{6,7},{6,22},{7,8},{7,24},{8,9},{8,24},{9,9},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,23} }, // 1911
    { {1,7},{1,21},{2,5},{2,20},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1912
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,23},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,22} }, // 1913
    { {1,6},{1,21},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,24},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,23} }, // 1914
    { {1,6},{1,21},{2,5},{2,20},{3,6},{3,22},{4,6},{4,21},{5,6},{5,22},{6,7},{6,22},{7,8},{7,24},{8,8},{8,24},{9,9},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,23} }, // 1915
    { {1,6},{1,21},{2,5},{2,20},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,24},{11,8},{11,23},{12,8},{12,23} }, // 1916
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1917
    { {1,6},{1,21},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,24},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,23} }, // 1918
    { {1,6},{1,21},{2,5},{2,20},{3,6},{3,22},{4,6},{4,21},{5,6},{5,22},{6,7},{6,22},{7,8},{7,24},{8,9},{8,24},{9,9},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,23} }, // 1919
    { {1,6},{1,21},{2,5},{2,20},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1920
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,24},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1921
    { {1,6},{1,21},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,24},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,22} }, // 1922
    { {1,6},{1,21},{2,5},{2,19},{3,6},{3,21},{4,6},{4,21},{5,6},{5,22},{6,7},{6,22},{7,8},{7,24},{8,8},{8,24},{9,9},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,23} }, // 1923
    { {1,6},{1,21},{2,5},{2,20},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1924
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1925
    { {1,6},{1,21},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,24},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,22} }, // 1926
    { {1,6},{1,21},{2,5},{2,19},{3,6},{3,21},{4,6},{4,21},{5,6},{5,22},{6,7},{6,22},{7,8},{7,24},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,23} }, // 1927
    { {1,6},{1,21},{2,5},{2,20},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,21},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1928
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1929
    { {1,6},{1,21},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,23},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,22} }, // 1930
    { {1,6},{1,21},{2,5},{2,19},{3,6},{3,21},{4,6},{4,21},{5,6},{5,22},{6,7},{6,22},{7,8},{7,24},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,23} }, // 1931
    { {1,6},{1,21},{2,5},{2,20},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,21},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1932
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,23},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1933
    { {1,6},{1,21},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,23},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,22} }, // 1934
    { {1,6},{1,21},{2,5},{2,19},{3,6},{3,21},{4,6},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,24},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,23} }, // 1935
    { {1,6},{1,21},{2,5},{2,20},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,21},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1936
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1937
    { {1,6},{1,21},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,23},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,22} }, // 1938
    { {1,6},{1,21},{2,5},{2,19},{3,6},{3,21},{4,6},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,24},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,22} }, // 1939
    { {1,6},{1,21},{2,5},{2,20},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,21},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1940
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1941
    { {1,6},{1,21},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,23},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,22} }, // 1942
    { {1,6},{1,21},{2,5},{2,19},{3,6},{3,21},{4,6},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,24},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,23} }, // 1943
    { {1,6},{1,21},{2,5},{2,20},{3,6},{3,21},{4,5},{4,20},{5,5},{5,21},{6,6},{6,21},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1944
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,24},{11,8},{11,22},{12,7},{12,22} }, // 1945
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,23},{8,8},{8,24},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1946
    { {1,6},{1,21},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,24},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,23} }, // 1947
    { {1,6},{1,21},{2,5},{2,20},{3,5},{3,21},{4,5},{4,20},{5,5},{5,21},{6,6},{6,21},{7,7},{7,23},{8,7},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1948
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,24},{11,8},{11,22},{12,7},{12,22} }, // 1949
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,24},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1950
    { {1,6},{1,21},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,24},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,23} }, // 1951
    { {1,6},{1,21},{2,5},{2,20},{3,5},{3,21},{4,5},{4,20},{5,5},{5,21},{6,6},{6,21},{7,7},{7,23},{8,7},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1952
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,24},{11,8},{11,22},{12,7},{12,22} }, // 1953
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1954
    { {1,6},{1,21},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,23},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,22} }, // 1955
    { {1,6},{1,21},{2,5},{2,20},{3,5},{3,20},{4,5},{4,20},{5,5},{5,21},{6,6},{6,21},{7,7},{7,23},{8,7},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1956
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,24},{11,8},{11,22},{12,7},{12,22} }, // 1957
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1958
    { {1,6},{1,21},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,23},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,22} }, // 1959
    { {1,6},{1,21},{2,5},{2,19},{3,5},{3,20},{4,5},{4,20},{5,5},{5,21},{6,6},{6,21},{7,7},{7,23},{8,7},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1960
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,21},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1961
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1962
    { {1,6},{1,21},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,23},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,22} }, // 1963
    { {1,6},{1,21},{2,5},{2,19},{3,5},{3,20},{4,5},{4,20},{5,5},{5,21},{6,6},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1964
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1965
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,21},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1965
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1966
    { {1,6},{1,21},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,23},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,22} }, // 1967
    { {1,6},{1,21},{2,5},{2,19},{3,5},{3,20},{4,5},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1968
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,21},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1969
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1970
    { {1,6},{1,21},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,23},{8,8},{8,24},{9,8},{9,24},{10,9},{10,24},{11,8},{11,23},{12,8},{12,22} }, // 1971
    { {1,6},{1,21},{2,5},{2,19},{3,5},{3,20},{4,5},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1972
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,5},{5,21},{6,6},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1973
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1974
    { {1,6},{1,21},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,23},{8,8},{8,24},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1975
    { {1,6},{1,21},{2,5},{2,19},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1976
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,5},{5,21},{6,6},{6,21},{7,7},{7,23},{8,7},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1977
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1978
    { {1,6},{1,21},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,21},{6,6},{6,22},{7,8},{7,23},{8,8},{8,24},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,8},{12,22} }, // 1979
    { {1,6},{1,21},{2,5},{2,19},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1980
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,5},{5,21},{6,6},{6,21},{7,7},{7,23},{8,7},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1981
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,24},{11,8},{11,22},{12,7},{12,22} }, // 1982
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,8},{7,23},{8,8},{8,24},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,8},{12,22} }, // 1983
    { {1,6},{1,21},{2,4},{2,19},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1984
    { {1,5},{1,20},{2,4},{2,19},{3,5},{3,21},{4,5},{4,20},{5,5},{5,21},{6,6},{6,21},{7,7},{7,23},{8,7},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1985
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,24},{11,8},{11,22},{12,7},{12,22} }, // 1986
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1987
    { {1,6},{1,21},{2,4},{2,19},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1988
    { {1,5},{1,20},{2,4},{2,19},{3,5},{3,20},{4,5},{4,20},{5,5},{5,21},{6,6},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1989
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,21},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,24},{11,8},{11,22},{12,7},{12,22} }, // 1990
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1991
    { {1,6},{1,21},{2,4},{2,19},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 1992
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,5},{5,21},{6,6},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1993
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,21},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1994
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1995
    { {1,6},{1,21},{2,4},{2,19},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 1996
    { {1,5},{1,20},{2,4},{2,18},{3,5},{3,20},{4,5},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1997
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,21},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 1998
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 1999
    { {1,6},{1,21},{2,4},{2,19},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2000
    { {1,5},{1,20},{2,4},{2,18},{3,5},{3,20},{4,5},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2001
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,21},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2002
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 2003
    { {1,6},{1,21},{2,4},{2,19},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2004
    { {1,5},{1,20},{2,4},{2,18},{3,5},{3,20},{4,5},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2005
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,5},{5,21},{6,6},{6,21},{7,7},{7,23},{8,7},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2006
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 2007
    { {1,6},{1,21},{2,4},{2,19},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2008
    { {1,5},{1,20},{2,4},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2009
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,5},{5,21},{6,6},{6,21},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2010
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 2011
    { {1,6},{1,21},{2,4},{2,19},{3,5},{3,20},{4,4},{4,20},{5,5},{5,20},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2012
    { {1,5},{1,20},{2,4},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2013
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,5},{5,21},{6,6},{6,21},{7,7},{7,23},{8,7},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2014
    { {1,6},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,22},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,24},{11,8},{11,22},{12,7},{12,22} }, // 2015
    { {1,6},{1,20},{2,4},{2,19},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2016
    { {1,5},{1,20},{2,3},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2017
    { {1,5},{1,20},{2,4},{2,19},{3,5},{3,21},{4,5},{4,20},{5,5},{5,21},{6,6},{6,21},{7,7},{7,23},{8,7},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2018
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,21},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,24},{11,8},{11,22},{12,7},{12,22} }, // 2019
    { {1,6},{1,20},{2,4},{2,19},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2020
    { {1,5},{1,20},{2,3},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2021
    { {1,5},{1,20},{2,4},{2,19},{3,5},{3,20},{4,5},{4,20},{5,5},{5,21},{6,6},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2022
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,21},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,24},{11,8},{11,22},{12,7},{12,22} }, // 2023
    { {1,6},{1,20},{2,4},{2,19},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,6},{12,21} }, // 2024
    { {1,5},{1,20},{2,3},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2025
    { {1,5},{1,20},{2,4},{2,18},{3,5},{3,20},{4,5},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2026
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,21},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2027
    { {1,6},{1,20},{2,4},{2,19},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,6},{12,21} }, // 2028
    { {1,5},{1,20},{2,3},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2029
    { {1,5},{1,20},{2,4},{2,18},{3,5},{3,20},{4,5},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2030
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,6},{5,21},{6,6},{6,21},{7,7},{7,23},{8,8},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2031
    { {1,6},{1,20},{2,4},{2,19},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,6},{12,21} }, // 2032
    { {1,5},{1,20},{2,3},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2033
    { {1,5},{1,20},{2,4},{2,18},{3,5},{3,20},{4,5},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2034
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,5},{5,21},{6,6},{6,21},{7,7},{7,23},{8,7},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2035
    { {1,6},{1,20},{2,4},{2,19},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,6},{12,21} }, // 2036
    { {1,5},{1,20},{2,3},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2037
    { {1,5},{1,20},{2,4},{2,18},{3,5},{3,20},{4,5},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2038
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,20},{5,5},{5,21},{6,6},{6,21},{7,7},{7,23},{8,7},{8,23},{9,8},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2039
    { {1,6},{1,20},{2,4},{2,19},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,6},{12,21} }, // 2040
    { {1,5},{1,20},{2,3},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2041
    { {1,5},{1,20},{2,4},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2042
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,23},{8,8},{8,24},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 2043
    { {1,6},{1,21},{2,5},{2,20},{3,6},{3,21},{4,5},{4,20},{5,5},{5,21},{6,6},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,7},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2044
    { {1,5},{1,19},{2,3},{2,18},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,6},{12,21} }, // 2045
    { {1,5},{1,20},{2,4},{2,18},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2046
    { {1,5},{1,20},{2,4},{2,19},{3,6},{3,21},{4,5},{4,21},{5,6},{5,22},{6,6},{6,22},{7,8},{7,23},{8,8},{8,24},{9,8},{9,23},{10,9},{10,24},{11,8},{11,23},{12,7},{12,22} }, // 2047
    { {1,6},{1,20},{2,4},{2,19},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,20},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,7},{10,23},{11,7},{11,21},{12,6},{12,21} }, // 2048
    { {1,5},{1,19},{2,3},{2,18},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2049
    { {1,5},{1,20},{2,3},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2050
    { {1,5},{1,20},{2,4},{2,19},{3,5},{3,20},{4,5},{4,20},{5,5},{5,21},{6,6},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2051
    { {1,5},{1,20},{2,4},{2,19},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,20},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,7},{10,23},{11,7},{11,21},{12,6},{12,21} }, // 2052
    { {1,5},{1,19},{2,3},{2,18},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2053
    { {1,5},{1,20},{2,3},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2054
    { {1,5},{1,20},{2,4},{2,19},{3,5},{3,20},{4,5},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2055
    { {1,5},{1,20},{2,4},{2,19},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,20},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,7},{10,23},{11,7},{11,21},{12,6},{12,21} }, // 2056
    { {1,5},{1,19},{2,3},{2,18},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,6},{12,21} }, // 2057
    { {1,5},{1,20},{2,3},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2058
    { {1,5},{1,20},{2,4},{2,19},{3,5},{3,20},{4,5},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2059
    { {1,5},{1,20},{2,4},{2,19},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,20},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,7},{10,23},{11,7},{11,21},{12,6},{12,21} }, // 2060
    { {1,5},{1,19},{2,3},{2,18},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,6},{12,21} }, // 2061
    { {1,5},{1,20},{2,3},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2062
    { {1,5},{1,20},{2,4},{2,18},{3,5},{3,20},{4,5},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2063
    { {1,5},{1,20},{2,4},{2,19},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,20},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,7},{10,23},{11,7},{11,21},{12,6},{12,21} }, // 2064
    { {1,5},{1,19},{2,3},{2,18},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,6},{12,21} }, // 2065
    { {1,5},{1,20},{2,3},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2066
    { {1,5},{1,20},{2,4},{2,18},{3,5},{3,20},{4,5},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2067
    { {1,5},{1,20},{2,4},{2,19},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,6},{12,21} }, // 2068
    { {1,5},{1,19},{2,3},{2,18},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,6},{12,21} }, // 2069
    { {1,5},{1,20},{2,3},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2070
    { {1,5},{1,20},{2,4},{2,18},{3,5},{3,20},{4,5},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2071
    { {1,5},{1,20},{2,4},{2,19},{3,5},{3,20},{4,4},{4,19},{5,4},{5,20},{6,5},{6,20},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,7},{10,23},{11,7},{11,21},{12,6},{12,21} }, // 2072
    { {1,5},{1,19},{2,3},{2,18},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,6},{12,21} }, // 2073
    { {1,5},{1,20},{2,3},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2074
    { {1,5},{1,20},{2,4},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2075
    { {1,5},{1,20},{2,4},{2,19},{3,5},{3,20},{4,4},{4,19},{5,4},{5,20},{6,5},{6,20},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,7},{10,23},{11,7},{11,21},{12,6},{12,21} }, // 2076
    { {1,5},{1,19},{2,3},{2,18},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,6},{12,21} }, // 2077
    { {1,5},{1,20},{2,3},{2,18},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2078
    { {1,5},{1,20},{2,4},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2079
    { {1,5},{1,20},{2,4},{2,19},{3,5},{3,20},{4,4},{4,19},{5,4},{5,20},{6,5},{6,20},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,7},{10,23},{11,7},{11,21},{12,6},{12,21} }, // 2080
    { {1,5},{1,19},{2,3},{2,18},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2081
    { {1,5},{1,20},{2,3},{2,18},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2082
    { {1,5},{1,20},{2,3},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2083
    { {1,5},{1,20},{2,4},{2,19},{3,4},{3,19},{4,4},{4,19},{5,4},{5,20},{6,5},{6,20},{7,6},{7,22},{8,6},{8,22},{9,6},{9,22},{10,7},{10,23},{11,7},{11,21},{12,6},{12,21} }, // 2084
    { {1,4},{1,19},{2,3},{2,18},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,20},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,7},{10,23},{11,7},{11,21},{12,6},{12,21} }, // 2085
    { {1,5},{1,19},{2,3},{2,18},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,6},{7,22},{8,7},{8,22},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2086
    { {1,5},{1,20},{2,3},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} }, // 2087
    { {1,5},{1,20},{2,4},{2,19},{3,4},{3,19},{4,4},{4,19},{5,4},{5,20},{6,4},{6,20},{7,6},{7,22},{8,6},{8,22},{9,6},{9,22},{10,7},{10,23},{11,7},{11,21},{12,6},{12,21} }, // 2088
    { {1,4},{1,19},{2,3},{2,18},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,20},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2089
    { {1,5},{1,19},{2,3},{2,18},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2090
    { {1,5},{1,20},{2,3},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2091
    { {1,5},{1,20},{2,4},{2,19},{3,4},{3,19},{4,4},{4,19},{5,4},{5,20},{6,4},{6,20},{7,6},{7,22},{8,6},{8,22},{9,6},{9,22},{10,7},{10,23},{11,7},{11,21},{12,6},{12,21} }, // 2092
    { {1,4},{1,19},{2,3},{2,18},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,20},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2093
    { {1,5},{1,19},{2,3},{2,18},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2094
    { {1,5},{1,20},{2,3},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2095
    { {1,5},{1,20},{2,4},{2,18},{3,4},{3,19},{4,4},{4,19},{5,4},{5,20},{6,4},{6,20},{7,6},{7,22},{8,6},{8,22},{9,6},{9,22},{10,7},{10,23},{11,7},{11,21},{12,6},{12,21} }, // 2096
    { {1,4},{1,19},{2,3},{2,18},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,20},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,6},{12,21} }, // 2097
    { {1,5},{1,19},{2,3},{2,18},{3,5},{3,20},{4,4},{4,19},{5,5},{5,20},{6,5},{6,21},{7,6},{7,22},{8,7},{8,22},{9,7},{9,22},{10,8},{10,23},{11,7},{11,22},{12,6},{12,21} }, // 2098
    { {1,5},{1,20},{2,3},{2,18},{3,5},{3,20},{4,4},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,22},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,21} }, // 2099
    // { {1,5},{1,20},{2,4},{2,18},{3,5},{3,20},{4,5},{4,20},{5,5},{5,21},{6,5},{6,21},{7,7},{7,23},{8,7},{8,23},{9,7},{9,23},{10,8},{10,23},{11,7},{11,22},{12,7},{12,22} },// 2100
};

// 查表获取节气日期
SolarTermDate get_solar_term_date(int year, int term_index) {
    if (year < 1901 || year > 2100 || term_index < 0 || term_index > 23) {
        SolarTermDate invalid = {0, 0};
        return invalid;
    }
    return solar_terms_table[year - 1901 + 1][term_index];
}

// 获取某天的节气（返回1为节气，0为否，term为节气名）
int GetSolarTerm(int year, int month, int day, char *term, int bufsize) {
    if (year < 1901 || year > 2100) return 0;
    for (int i = 0; i < 24; ++i) {
        SolarTermDate d = get_solar_term_date(year, i);
        if (d.month == month && d.day == day) {
            snprintf(term, bufsize, "%s", SOLAR_TERMS[i]);
            return 1;
        }
    }
    return 0;
}
// 获取本月两个节气的日期（terms[0][0]=第一个节气日, terms[1][0]=第二个节气日）
void GetMonthSolarTerms(int year, int month, int terms[2][2]) {
    if (year < 1901 || year > 2100) { terms[0][0]=terms[1][0]=0; return; }
    int found = 0;
    for (int i = 0; i < 24; ++i) {
        SolarTermDate d = get_solar_term_date(year, i);
        if (d.month == month) {
            terms[found][0] = d.day;
            terms[found][1] = i;
            found++;
            if (found == 2) break;
        }
    }
    if (found < 2) terms[1][0]=0;
}
// 判断是否闰月（返回1为闰月，0为否）
int IsLeapMonth(int year, int month) {
    LunarYearInfo info = getLunarYearInfo(year);
    return info.leapMonth == month;
}

// ===================== 农历数字转汉字 =====================
// CHINESE_NUMS：0-10的中文数字
static const char* CHINESE_NUMS[] = {"零","一","二","三","四","五","六","七","八","九","十"};
// CHINESE_MONTHS：农历月份中文
static const char* CHINESE_MONTHS[] = {"正","二","三","四","五","六","七","八","九","十","十一","腊"};

// 农历日转汉字（初一、初二、十七、廿三、三十等）
void LunarDayToChinese(int day, char* buf, int bufsize) {
    static const char* prefix[] = {"初", "十", "廿", "三"};
    if (day <= 0 || day > 30) { snprintf(buf, bufsize, ""); return; }
    if (day <= 10) {
        snprintf(buf, bufsize, "初%s", CHINESE_NUMS[day]);
    } else if (day < 20) {
        snprintf(buf, bufsize, "十%s", CHINESE_NUMS[day-10]);
    } else if (day == 20) {
        snprintf(buf, bufsize, "廿十");
    } else if (day < 30 && day >= 21) {
        snprintf(buf, bufsize, "廿%s", CHINESE_NUMS[day-20]);
    } else {
        snprintf(buf, bufsize, "三十");
    }
}
// 农历月转汉字（正月、二月、闰月等）
void LunarMonthToChinese(int month, int isLeap, char* buf, int bufsize) {
    if (month < 1 || month > 12) { snprintf(buf, bufsize, ""); return; }
    snprintf(buf, bufsize, "%s%s月", isLeap ? "闰" : "", CHINESE_MONTHS[month-1]);
}
// 农历年转汉字（如二零二四年）
void LunarYearToChinese(int year, char* buf, int bufsize) {
    int y = year;
    char tmp[32] = "";
    snprintf(tmp, sizeof(tmp), "%d", y);
    int len = strlen(tmp);
    buf[0] = '\0';
    for (int i = 0; i < len; ++i) {
        int n = tmp[i] - '0';
        strncat(buf, CHINESE_NUMS[n], bufsize - strlen(buf) - 1);
    }
    strncat(buf, "年", bufsize - strlen(buf) - 1);
}
